#include "FrameReader.hpp"
#include <stdexcept>

FrameReader::FrameReader(std::filesystem::path path)
{
  inputFrameReader.open(path);
  if(!inputFrameReader.is_open())
    throw std::runtime_error("Can't open Frame id file");
}

FrameReader::~FrameReader()
{
  inputFrameReader.close();
}

long FrameReader::GetFrameID()
{
  long input;
  inputFrameReader>>input;
  if(!inputFrameReader.good())
    throw std::runtime_error("Read Frame ID file get Error");
  return input;
}
